﻿using System;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace wires_as_objects
{
    class Program
    {
        static void Main(string[] args)
        {
            var toDict = new ToDictionary(new Split_config_into_parameters(),
                                          new Split_parameters_into_key_and_value(),
                                          new Assemble_dictionary());

            foreach (var w in toDict.Wires)
            {
                w.Traceing = true;
                w.Throttle(500);
            }

            toDict.Result += dict =>
                               {
                                   foreach (var kv in dict)
                                       Console.WriteLine("{0}={1}", kv.Key, kv.Value);
                               };

            toDict.Process("a=1;b=2;c=3");
        }
    }
}
